<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('labor_exits', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('company_id')->default(0)->index();
            $table->unsignedBigInteger('labor_id');  // 劳务人员ID
            $table->string('employment_form')->nullable()->comment('用工形式');
            $table->string('remuneration_method')->nullable()->comment('计酬方式');
            $table->string('attendance_expenses')->nullable()->comment('总考勤费用');
            $table->string('exit_settle')->nullable()->comment('退场结清');
            $table->string('clothing_expenses')->nullable()->comment('扣服装费用');
            $table->string('safety_helmet')->nullable()->comment('扣安全帽费用');
            $table->string('confirm')->nullable()->comment('本人退场确认');
            $table->string('site_confirmation')->nullable()->comment('现场带班确认');
            $table->string('department')->nullable()->comment('项目部确认');
            $table->string('reminders')->nullable()->comment('退场提醒次数');
            $table->string('leaders_evaluation')->nullable()->comment('班组长对劳务评价');
            $table->string('department_evaluation')->nullable()->comment('项目部对劳务评价');
            $table->dateTime('exit_date')->nullable()->comment('退场时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('labor_exits');
    }
};
